-
Notifications
You must be signed in to change notification settings - Fork 24
Translations ("i18n", "l10n")
Do mind the definitions in the glossary on the "Terms and wording" wiki page. These comprehensive definitions (in English) might also be helpful to properly determine the corresponding terms in other languages.
Please use the discussion thread "Problematic source strings for translation" for feedback and criticism with regard to source strings (in English) and the aforementioned glossary.
Add appropriate import statement to your Patch:
import org.SfietKonstantin.patchmanager 2.0
Add property pmTranslationLoaded to the root object of your Patch:
property bool pmTranslationLoaded: PatchManagerTranslator ? PatchManagerTranslator.installTranslator("name-of-your-patch") : false
Change most visible text to [ToDo: Understand & describe, what this is about, e.g. "Emit different text, when a translation was successfully loaded"?]:
pmTranslationLoaded ? qsTr("Normal text if all is okay") : "Please update patchmanager!"
- openrepos.net/content/coderus/patchmanager-30 (Internet Archive snapshot 2021-01-12) now at openrepos.net/content/patchmanager/patchmanager-legacy
- coderus.openrepos.net/pm2/usage
Do read and optionally follow the links of the resolution of issue #27.
A suggestion in a new issue for a paragraph which integrates this information here will be highly appreciated.
https://doc.qt.io/qt-5/linguist-manager.html
https://linux.die.net/man/1/lupdate
The specific command for updating Patchmanager's translation source TS file from the source strings proper is (all translatable source strings are beneath the src directory):
lupdate src -ts translations/settings-patchmanager.ts
Note that on e.g. OpenSUSE, installing Qt5 Linguist does not add /usr/lib64/qt5/bin to the search path, hence one has to use:
/usr/lib64/qt5/bin/lupdate [-no-obsolete] src -ts translations/settings-patchmanager.ts
https://linux.die.net/man/1/lrelease
https://app.transifex.com/coderus/patchmanager3/